﻿using System;
using System.Data;
using System.Collections;
using CE.Database;

/// <summary>
/// Summary description for TransferAXACustomer

/// Table Name : [tblTransferDataAXACustomer]
/// Created By : CX
/// Created Date : Tuesday, May 03, 2011
/// </summary>
/// 
namespace CE.Transfer
{

    public class TransferAXACustomerDB
    {
        public TransferAXACustomerDB()
        {	//TODO: Add constructor logic here

        }

        public Int64 Insert(TransferAXACustomer transfer)
		{
			MyDatabase _db = new MyDatabase();
            Int64 _result = -1;
            string _spName = "[sprocInsert]";
			
			SortedList _sPara = new SortedList();
			
			#region Parameter			
            
            _sPara.Add("@DESCRN", transfer.DESCRN);
            _sPara.Add("@TYDES", transfer.TYDES);
            _sPara.Add("@CLNTNAME01", transfer.CLNTNAME01);
            _sPara.Add("@CLNTNAME02", transfer.CLNTNAME02);
            _sPara.Add("@ENTYNAME01", transfer.ENTYNAME01);
            _sPara.Add("@ENTYNAME02", transfer.ENTYNAME02);
            _sPara.Add("@TAUSER", transfer.TAUSER);
            _sPara.Add("@CORNAME01", transfer.CORNAME01);
            _sPara.Add("@CORNAME02", transfer.CORNAME02);
            _sPara.Add("@ZDRVNAME01", transfer.ZDRVNAME01);
            _sPara.Add("@ZDRVNAME02", transfer.ZDRVNAME02);
            _sPara.Add("@TSTDES", transfer.TSTDES);
            _sPara.Add("@CAPNAME01", transfer.CAPNAME01);
            _sPara.Add("@CAPNAME02", transfer.CAPNAME02);
            _sPara.Add("@ZINSNM01", transfer.ZINSNM01);
            _sPara.Add("@ZINSNM02", transfer.ZINSNM02);
            _sPara.Add("@ZREMARK", transfer.ZREMARK);
            _sPara.Add("@ACCFLG", transfer.ACCFLG);

            #endregion
			
            _result = _db.ExecuteSP(_spName, _sPara);

            return _result;
		}

        public bool Update()
        {
            return true;
        }

        public bool Delete(Int64 id)
		{
			MyDatabase _db = new MyDatabase();
            Int64 _result = -1;
            string _spName = "[sprocDelete]";
			
			SortedList _sPara = new SortedList();	
			

            #region Parameter
            //_sPara.Add("@ID", id);
            //_sPara.Add("@ID2", id2);
            #endregion

            _result = _db.ExecuteSP(_spName, _sPara);

            return _result > 0;			
		}


    }


}



